package com.hy.controller;

import com.hy.service.MessageService;
import com.hy.service.UserService;
import com.hy.service.impl.MessageServiceImpl;
import com.hy.service.impl.UserServiceImpl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MessageController {
    private MessageService messageService = new MessageServiceImpl();
    public void queryMessage(HttpServletRequest request, HttpServletResponse response) throws Exception {
        messageService.listMessage(request,response);
    }

    public void queryUserMessage(HttpServletRequest request, HttpServletResponse response) throws Exception {
        messageService.listUserMessage(request,response);
    }

    public void addMessage(HttpServletRequest request, HttpServletResponse response) throws Exception {
        messageService.saveMessage(request,response);
    }

    public void queryMessageList(HttpServletRequest request, HttpServletResponse response) throws Exception {
        messageService.listMessageList(request,response);
    }

    public void queryFollowUserMessage(HttpServletRequest request, HttpServletResponse response) throws Exception {
        messageService.listFollowUserMessage(request,response);
    }
}
